package com.zf.yichat.mapper;

import com.zf.yichat.base.FsMapper;
import com.zf.yichat.dto.ChatroomAdminUserDto;
import com.zf.yichat.model.MessageChatroomAdminUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MessageChatroomAdminUserMapper  extends FsMapper<MessageChatroomAdminUser> {

    /**
     * 根据聊天室id获取管理员列表
     * @param chatroomId
     * @return
     */
    List<MessageChatroomAdminUser> selectAdminListByChatId(@Param("chatroomId") String chatroomId);

    /**
     * 根据聊天室id获取管理员列表(关联昵称,手机号等信息)
     * @param chatroomId
     * @return
     */
    List<ChatroomAdminUserDto> queryChatroomAdmin(@Param("chatroomId") String chatroomId, @Param("userId") String userId,
                                                  @Param("nick") String nick,@Param("mobile") String mobile,@Param("realName") String realName);

    /**
     * 删除管理员
     * @param chatroomId
     * @param userId
     * @return
     */
    int deleteChatroomAdmin(@Param("chatroomId") String chatroomId, @Param("userId") String userId);
}
